<!--
 * @Description  : 
 * @Version      : 1.0
 * @Author       : Shiming
 * @Date         : 2022-04-06 10:57:56
 * @LastEditors  : Shiming
 * @LastEditTime : 2022-04-21 16:41:13
 * @FilePath     : \\tms-obc-web\\src\\app\\routes\\financial-management\\components\\freight-account\\freight-account-detail\\freight-account-detail.component.html
 * Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<page-header-wrapper [title]="'货主账号明细'" [logo]="logo">
    <ng-template #logo>
        <button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
            <i nz-icon nzType="left" nzTheme="outline"></i>
        </button>
    </ng-template>
</page-header-wrapper>

<nz-card>
    <nz-row [nzGutter]="16">
        <nz-col [nzXl]="9" [nzLg]="8" [nzSm]="12">
            <nz-statistic [nzValue]="params.ltdName+'('+(params.bankType==='1'?'平安':'浦发')+')'"
                [nzTitle]="params.tenantName" [nzValueStyle]="{'font-size':'16px','font-weight':'bold'}" class="bold">
            </nz-statistic>
        </nz-col>
        <nz-col [nzXl]="5" [nzLg]="8" [nzSm]="12">
            <nz-statistic [nzValue]="(params?.availableBalance | currency)+'元' " [nzTitle]="'账户余额'"
                [nzValueStyle]="{'font-size':'16px',color:'red'}">
            </nz-statistic>
        </nz-col>
        <nz-col [nzXl]="5" [nzLg]="8" [nzSm]="12">
            <nz-statistic [nzValue]="((info?.incomeAmount | currency) || 0) +'元'" [nzTitle]="'收入金额'"
                [nzValueStyle]="{'font-size':'16px',color:'red'}">
            </nz-statistic>
        </nz-col>
        <nz-col [nzXl]="5" [nzLg]="8" [nzSm]="12">
            <nz-statistic [nzValue]="((info?.payAmount | currency) || 0) +'元'" [nzTitle]="'支出金额'"
                [nzValueStyle]="{'font-size':'16px',color:'red'}">
            </nz-statistic>
        </nz-col>
    </nz-row>
</nz-card>

<nz-card nzBordered>
    <div nz-row nzGutter="8">
        <div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
            <sf #sf [schema]="searchSchema"
                [ui]="{ '*': { spanLabelFixed: 90,grid: { lg: 8, md: 12, sm: 12, xs: 24 } }}" [compact]="true"
                [button]="'none'"></sf>
        </div>
        <div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right">
            <button nz-button nzType="primary" [nzLoading]="service.http.loading"
                (click)="st?.load(1);">查询</button>
            <button nz-button (click)="resetSF()">重置</button>
            <button nz-button (click)="exportList()"> 导出</button>
            <button nz-button nzType="link" (click)="expandToggle()">
                {{ !_$expand ? '展开' : '收起' }}
                <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
            </button>
        </div>
    </div>
</nz-card>

<nz-card class="content-box" nzBordered>
    <st #st [data]="service.$api_get_shipper_account_detail" [columns]="columns"
        [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' },  process: beforeReq }"
        [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
        [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
        [loading]="false" [scroll]="{ x:'1200px',y: '300px' }" (change)="stChange($event)"></st>
    <div class="total-footer text-md" *ngIf="st?.list?.length !== 0 ">
        合计 <label class="text-red-dark">{{ static?.total }}</label> 项，收入
        <label class="text-red-dark font-weight-bold">{{ static?.incomeAmount | currency }}</label>，支出
        <label class="text-red-dark font-weight-bold">{{static?.payAmount | currency }}</label>
    </div>
</nz-card>